<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="fr">
<head>
<?php// use_stylesheet('modulesformation.css') ?>
<meta http-equiv="Content-Type"content="text/html;charset=utf-8" />
</head>
<body>
<table class = "sitemap"><tr>
<td style = "border-right-style:groove;border-color:black;" align = "center" width = "100px"><a href = "<?php echo url_for('@accueil')?>">Accueil</a></td>
<td align = "center" width = "200px"><a href = "<?php echo url_for('modulesformation/index')?>" style = "color:#c4111e">Les programmes de formation</a></td>
</tr></table>
<h1>Les programmes de formation</h1>
<table style = "border:1px black; min-width:600px; border-color:gray; margin-left:50px; margin-right:50px" align = "center" >
  <thead>
    <tr>
      <th width = "25%" style = "border-top-style:groove;border-bottom-style:groove;border-color:black; color:white">Module</th>
      <th width = "25%" style = "border-top-style:groove;border-bottom-style:groove;border-color:black; color:white">Date debut</th>
      <th width = "25%" style = "border-top-style:groove;border-bottom-style:groove;border-color:black; color:white">Date fin</th>
      <th width = "25%" style = "border-top-style:groove;border-bottom-style:groove;border-color:black; color:white">Tarif</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($moduless as $modules): ?>
    <tr height = "50px">
      <td width = "25%" align = "center" style = "border-bottom-style:groove;border-right-style:groove;border-color:black; color:white"><a href="<?php echo url_for('modulesformation/show?id='.$modules->getId()) ?>"><?php echo $modules->getNom() ?></a></td>
      <td width = "25%" align = "center" style = "border-bottom-style:groove;border-right-style:groove;border-color:black; color:white"><?php echo $modules->getDateDebut() ?></td>
      <td width = "25%" align = "center" style = "border-bottom-style:groove;border-right-style:groove;border-color:black; color:white"><?php echo $modules->getDateFin() ?></td>
      <td width = "25%" align = "center" style = "border-bottom-style:groove;border-color:black; color:white"><?php echo $modules->getTarif() ?></td>
  
    </tr>
    <?php endforeach; ?>
	<?php if($sf_user->isAuthenticated()):?>
	<?php if ($sf_user->getGuardUser()->hasGroup('admin')):?>
	<tr>
		<td><a href="<?php echo url_for('modulesformation/new') ?>">Nouvelle</a></td>
	</tr>
	<?php endif;?>
	<?php endif;?>
  </tbody>
</table>

<?php if ($pagination->haveToPaginate()): ?>
  <div class="pagination" align="center">
    <a href="<?php echo url_for('modulesformation/index', $moduless) ?>?page=<?php echo $pagination->getFirstPage() ?>">
		<img src="../images/first.png" alt="Next page" title="Premier" /></a>
    <a href="<?php echo url_for('modulesformation/index', $moduless) ?>?page=<?php echo $pagination->getPreviousPage() ?>">
		<img src="../images/previous.png" alt="Next page" title="Precedent" /></a>
 
    <?php foreach ($pagination->getLinks() as $page): ?>
      <?php if ($page == $pagination->getPage()): ?>
        <b style = "color:white"><?php echo $page ?></b>
      <?php else: ?>
        <a href="<?php echo url_for('modulesformation/index', $moduless) ?>?page=<?php echo $page ?>"><?php echo $page?></a>
      <?php endif; ?>
	<?php endforeach; ?>
 
    <a href="<?php echo url_for('modulesformation/index', $moduless) ?>?page=<?php echo $pagination->getNextPage() ?>">
	<img src="../images/next.png" alt="Next page" title="Suivant" /></a>
    <a href="<?php echo url_for('modulesformation/index', $moduless) ?>?page=<?php echo $pagination->getLastPage() ?>">
	<img src="../images/last.png" alt="Next page" title="Dernier" /></a>
  </div>
<?php endif; ?>
  
</body>
</html>
